# Check packages are installed and load ----------------------------

# Check that required packages are installed:
want = c("tidyverse",
         "quanteda",
         "tm",
         "devtools",
         "here",
         "stringr",
         "rio",
         "sjmisc",
         "lubridate",
         "zoo")
have = want %in% rownames(installed.packages())
if ( any(!have) ) { install.packages( want[!have] ) }
# load packages
junk <- lapply(want, library, character.only = TRUE)
rm(have,want,junk)

